<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/finance/djlc/cw_djlc_cwzb_view.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/finance/djlc/cw_djlc_cwzb_view.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'cw_djlc_djzb_id',
                footer: "Foots",
                cnName: '财务汇总主表_传统车',
                name: 'djlc/cw_djlc_cwzb_view',
                url: "/cw_djlc_cwzb_view/",
                sortName: "cw_djlc_djzb_id"
            });
            const editFormFields = ref({"vehiclekeyword":""});
            const editFormOptions = ref([[{"dataKey":"定价流程_变动制造和变动销售","data":[],"title":"关键词","field":"vehiclekeyword","type":"select"}]]);
            const searchFormFields = ref({"materialnum":""});
            const searchFormOptions = ref([[{"title":"整车头物料号","field":"materialnum","type":"like"}]]);
            const columns = ref([{field:'vehiclekeyword',title:'关键词',type:'string',bind:{ key:'定价流程_变动制造和变动销售',data:[]},width:160,align:'left',sort:true},
                       {field:'sale_keyword',title:'产品_销售关键词',type:'string',width:220,align:'left'},
                       {field:'djlc_salechannel',title:'产品_销售渠道',type:'string',width:120,align:'left'},
                       {field:'djlc_vehicletype',title:'产品_车型种类',type:'string',width:120,align:'left'},
                       {field:'djlc_drivetype',title:'产品_驱动类型',type:'string',width:120,align:'left'},
                       {field:'djlc_fuel',title:'产品_燃料类型',type:'string',width:120,align:'left'},
                       {field:'djlc_pilothouse',title:'产品_驾驶室平台',type:'string',width:120,align:'left'},
                       {field:'materialnum',title:'整车头物料号',type:'string',width:160,align:'left'},
                       {field:'totalprice',title:'BOM材料成本',type:'decimal',width:120,align:'left'},
                       {field:'decreasePrice',title:'降幅金额',type:'decimal',width:110,align:'left'},
                       {field:'rabatePrice',title:'返利金额',type:'decimal',width:110,align:'left'},
                       {field:'dcjb',title:'单车降本',type:'decimal',width:110,align:'left'},
                       {field:'jbl',title:'降本率（%）',type:'decimal',width:110,align:'left'},
                       {field:'jbhclcb',title:'降本后材料成本',type:'decimal',width:150,align:'left'},
                       {field:'artificial',title:'直接人工',type:'decimal',width:110,align:'left'},
                       {field:'cw_djlc_djzb_id',title:'定价流程主表UUID',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'cw_djlc_cwzb_id',title:'财务变动取值主表UUID',type:'guid',width:110,hidden:true,align:'left'},
                       {field:'changepowercost',title:'变动动力费',type:'decimal',width:120,align:'left'},
                       {field:'changematerials',title:'变动辅材',type:'decimal',width:120,align:'left'},
                       {field:'changemaintenance',title:'变动维修及工废',type:'decimal',width:120,align:'left'},
                       {field:'salescommission',title:'销售提成',type:'decimal',width:120,align:'left'},
                       {field:'vehiclelogisticsfee',title:'整车物流费',type:'decimal',width:120,align:'left'},
                       {field:'sanbaoserviceFee',title:'三包服务费',type:'decimal',width:120,align:'left'},
                       {field:'development_expense',title:'研发费用',type:'decimal',width:110,align:'left'},
                       {field:'lianhetong',title:'联合通',type:'decimal',width:110,align:'left'},
                       {field:'air_bottle_testing',title:'气瓶检测',type:'decimal',width:110,align:'left'},
                       {field:'shuijin',title:'税金',type:'decimal',width:110,align:'left'},
                       {field:'zerobianjihanshui',title:'0边际含税',type:'decimal',width:110,align:'left'},
                       {field:'marginalrate',title:'边际率（%）',type:'decimal',width:100,align:'left'},
                       {field:'bianjihanshui',title:'边际含税',type:'decimal',width:110,align:'left'},
                       {field:'jydjhanshui',title:'经营底价含税',type:'decimal',width:110,align:'left'},
                       {field:'jyccj',title:'建议出厂价',type:'decimal',width:100,align:'left'},
                       {field:'factoryprice',title:'标准出厂价',type:'decimal',width:100,align:'left'},
                       {field:'cw_djlc_qddjgz_id',title:'渠道定价规则',type:'guid',width:110,hidden:true,align:'left'},
                       {field:'channelname',title:'渠道',type:'string',width:110,hidden:true,align:'left'},
                       {field:'promotion',title:'促销',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'businesspercent',title:'商务',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'status',title:'状态',type:'int',width:80,hidden:true,align:'left'},
                       {field:'bomnumber',title:'BOM编号',type:'string',width:150,hidden:true,align:'left'},
                       {field:'newbomnumber',title:'新BOM编号',type:'string',width:120,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
